﻿#region << 版 本 注 释 >>
/*----------------------------------------------------------------
* 项目名称 ：APP.Report.Entity.Response
* 项目描述 ：
* 类 名 称 ：MemberBillResponse
* 类 描 述 ：
* 所在的域 ：DESKTOP-07DQ4D0
* 命名空间 ：APP.Report.Entity.Response
* 机器名称 ：DESKTOP-07DQ4D0 
* CLR 版本 ：4.0.30319.42000
* 作    者 ：Me.笨先生 (66623978)
* 创建时间 ：2018/2/6 22:28:01
* 更新时间 ：2018/2/6 22:28:01
* 版 本 号 ：v1.0.0.0
*******************************************************************
* Copyright @ admin 2018. All rights reserved.
*******************************************************************
//----------------------------------------------------------------*/
#endregion

using System;
using Newtonsoft.Json;

namespace APP.Report.Entity.Response
{
    public class MemberBillResponse
    {
        #region 构造函数
        /// <summary>
        /// 构造函数 
        /// </summary>
        public MemberBillResponse()
        {
            BillTypeID = 0;
            ObjectID = 0;
            Title = "";
            Intro = "";
            Remark = "";
            BillDate = "";
            OperationType = 0;
            AmountType = 0;
            ProductTypeParentID = 0;
            ProductTypeID = 0;
            ProductID = 0;
        }
        #endregion

        #region 属性集
        /// <summary>
        /// 
        /// </summary>
        [JsonProperty("billId")]
        public long BillID { get; set; }
        /// <summary>
        /// 账单类别ID
        /// </summary>
        [JsonProperty("billTypeId")]
        public long BillTypeID { get; set; }

        /// <summary>
        /// 相关ID
        /// </summary>
        [JsonProperty("objectId")]
        public long ObjectID { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        [JsonProperty("title")]
        public string Title { get; set; }

        /// <summary>
        /// 简介
        /// </summary>
        [JsonProperty("intro")]
        public string Intro { get; set; }

        /// <summary>
        /// 内容
        /// </summary>
        [JsonProperty("remark")]
        public string Remark { get; set; }

        /// <summary>
        /// 日期
        /// </summary>
        [JsonProperty("billDate")]
        public string BillDate { get; set; }

        /// <summary>
        /// 操作类型
        /// </summary>
        [JsonProperty("operationType")]
        public int OperationType { get; set; }

        /// <summary>
        /// 金额类型
        /// </summary>
        [JsonProperty("amountType")]
        public int AmountType { get; set; }

        /// <summary>
        /// 账单金额
        /// </summary>
        [JsonProperty("billAmount")]
        public Decimal BillAmount { get; set; }

        /// <summary>
        /// 账单显示金额
        /// </summary>
        [JsonProperty("billAmountStr")]
        public string BillAmountStr
        {
            get
            {
                if (BillAmount < 0.01m && BillAmount > 0)
                {
                    return "不足0.01";
                }
                return ((long)(BillAmount * 100) / 100.0).ToString("N2");
            }
        }

        /// <summary>
        /// 产品类别父类ID
        /// </summary>
        [JsonProperty("productTypeParentId")]
        public long ProductTypeParentID { get; set; }

        /// <summary>
        /// 产品类别ID
        /// </summary>
        [JsonProperty("productTypeId")]
        public long ProductTypeID { get; set; }

        /// <summary>
        /// 产品ID
        /// </summary>
        [JsonProperty("productId")]
        public long ProductID { get; set; }

        /// <summary>
        /// 是否可以点击显示详细，0否1是
        /// </summary>
        [JsonProperty("isClick")]
        public int IsClick
        {
            get
            {
                if (OperationType == 1 || OperationType == 2 || OperationType == 5 || OperationType == 6)
                {
                    return 1;
                }
                else { return 0; }
            }
        }

        /// <summary>
        /// 卡卷返现图标
        /// </summary>
        [JsonProperty("cardIconUrl")]
        public string CardCouponIconUrl
        {
            get
            {
                if (OperationType == 10)
                {
                    return "";
                }
                return "";
            }
        }
        #endregion

    }
}